﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system.collections
{
    /*
        Works with collections and arrays:

        bool isNullOrEmpty = array.IsNullOrEmpty()
        instead of

        bool isNullOrEmpty = array == null || array.Length == 0;
    */

    public static partial class CollectionExtensions
    {
        public static bool IsNullOrEmpty(this ICollection obj)
        {
            return (obj == null || obj.Count == 0);
        }
    }
}
